package com.service.impl;

import com.dao.UserDao;
import com.entity.User;
import com.service.UserService;

import java.util.List;

public class UserServiceImpl implements UserService {
    UserDao userDao;

    @Override
    public int addOne(User user) {

        int j = userDao.addOne(user);
        return j;
    }

    @Override
    public int delete(int id) {
        return userDao.delete(id);
    }

    @Override
    public int update(User user) {
        return userDao.update(user);
    }

    @Override
    public List<User> findAll() {
        return userDao.findAll();
    }

    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

    public UserDao getUserDao() {
        return userDao;
    }
}
